<template>
  <main>
    <SeachBar ref="searchBarRef"></SeachBar>
    <Teleport to="body">
      <Dialog></Dialog>
    </Teleport>
    <List></List>
  </main>
</template>

<script setup>
import SeachBar from './SeachBar/SeachBar.vue'
import Dialog from './Dialog/Dialog.vue'
import List from './List/List.vue'
import { onMounted, ref } from 'vue'

const searchBarRef = ref()

const cb = () => {
  searchBarRef.value.handleClick()
}

onMounted(async () => {
  myApi.openDialog()
  myApi.renderer(cb)
})
</script>

<style lang="less" scoped></style>
